﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;

namespace BLL
{
    public class LikeBLL
    {
        //根据商品ID以及用户ID查看商品是否已经收藏
        public static bool selectNumBLL(int userID,int goodsID)
        {
            return LikeDAL.selectNumDAL(userID,goodsID);
        }
        ////根据商品ID以及用户ID删除
        public static bool deleteNumBLL(int userID, int goodsID)
        {
            return LikeDAL.deleteNumDAL(userID,goodsID);
        }
        //根据收藏ID进行删除
        public static bool deleteByIDBLL(int LikeID)
        {
            return LikeDAL.deleteByIDDAL(LikeID);
        }
        //增加
        public static bool addBLL(int userID, int goodsID)
        {
            return LikeDAL.addDAL(userID,goodsID);
        }
        //查询收藏商品的信息，联表查询like_Goods
        public static List<Like_Goods> getAllBLL(int userID)
        {
            return LikeDAL.getAllDAL(userID);
        }
    }
}
